#pragma once
#include "vocoder.h"
#include <vector>

/*
Utility class for overlapping Modulator samples.
Must be used in conjunction with a Modulator implementation that actually returns an appropriate signal.
*/
class OverlappingModulator :
	public Modulator
{
public:
	OverlappingModulator(Modulator* modulator, unsigned int overlapLength);
	~OverlappingModulator(void);

	bool NextModulatorSample(short* output, unsigned int length, std::vector<SampleMarker>* markersReceiver=NULL);

private:
	void Initialize(unsigned int windowLength);
	std::vector<short> lastSample;
	Modulator* modulator;
	unsigned int overlapLength;
};
